<?php
class ModelCoreView extends Model 
{
	public function __construct()
	{
		foreach (glob("model/view/*.php") as $filename)
		{
			include $filename;
		}
	}
	
	public function insertview($object, $data)
	{
		$objectdata = array();
		foreach($this->views[$object] as $key => $value)
		{
			$this->load->modelview("view/".$value);
			
			$objectdata[$object] = $data;
			return $this->model_view->insertview($objectdata);
		}
	}
	
	public function updateview($object, $data)
	{
		$objectdata = array();
		foreach($this->views[$object] as $key => $value)
		{
			$this->load->modelview("view/".$value);
			
			$objectdata[$object] = $data;
			return $this->model_view->updateview($objectdata);
		}
	}
	
	public function deleteview($object, $data)
	{
		$objectdata = array();
		foreach($this->views[$object] as $key => $value)
		{
			$this->load->modelview("view/".$value);
			
			$objectdata[$object] = $data;
			return $this->model_view->deleteview($objectdata);
		}
	}
	
	
	
	
}

?>